#ifndef RULEDIALOG_H
#define RULEDIALOG_H

#include <QDialog>
#include "Rule.h"

namespace Ui {
    class RuleDialog;
}

class RuleDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RuleDialog(QWidget *parent = 0, Rule *rule = 0);
    ~RuleDialog();

private slots:
    void on_buttonBox_accepted();

    void on_buttonBox_rejected();

    void on_comboBox_currentIndexChanged(int index);

signals:
    void rule_created(Rule *);
    void rule_edited(Rule *);

private:
    Ui::RuleDialog *ui;
    Rule *mRule;
    bool mIsEdit;
};

#endif // RULEDIALOG_H
